{% layout('layout/default') -%}
{% script('/javascripts/write-blog.js') -%}
<div class="mod">
            <div class="write-type">
                <span class="current">推荐网址</span>
                <span>推荐音乐</span>
                <span>写状态</span>
            </div>
            <div class="mod-bd">
                <div class="form">
                    <form role="form" action="/post/create" method="post">
                        <div class="form-group">
                            <label>Title</label>
                            <input type="text" autocomplete="off" class="form-control" name="title" value="" />
                        </div>
                        <div class="form-group">
                            <label>Slug</label>
                            <input type="text" autocomplete="off" class="form-control" name="slug" value="" />
                        </div>
                        <div class="form-group" id="blog-media">
                            <label>Media</label>
                            <input type="hidden" autocomplete="off" class="form-control" name="media" value="" />
                            <input id="blog-media-input" type="text" autocomplete="off" class="form-control" value="http://v.youku.com/v_show/id_XNjI5MzU1NTcy.html" />
                            <select>
                                <option value="video">video</option>
                                <option value="music">music</option>
                                <option value="image">image</option>
                            </select>
                            <button>get Media</button>
                        </div>
                        <div class="form-media">
                        </div>
                        <div class="form-group">
                            <label>Text</label>
                            <textarea name="text" class="form-control"></textarea>
                        </div>
                        <div class="form-group">
                            <label>Cover</label>
                            <input type="text" autocomplete="off" class="form-control" name="cover" value="" />
                        </div>
                        <div class="form-group">
                            <label>Tags</label>
                            <input type="text" autocomplete="off" class="form-control" name="tags" value="" />
                        </div>
                        <div class="form-group">
                            <label>Category</label>
                            <select name="category" class="form-control">
                                {% categories.forEach(function(category){ %}
                                <option value="{%-category._id%}">{%-category.name%}</option>
                                {% }) %}
                            </select>
                        </div>
                        <input type="hidden" autocomplete="off" class="form-control" name="author" value="{%-user._id%}" />
                        <button type="submit" class="btn btn-default">Submit</button>
                    </form>
                </div>
            </div>
        </div>
        <script type="text/html" id="music-tpl-layout">
            <table>
                <thead>
                    <tr>
                        <td>song_id</td>
                        <td>song_name</td>
                        <td>artist_id</td>
                        <td>artist_name</td>
                        <td>album_id</td>
                        <td>album_name</td>
                        <td>album_logo</td>
                    </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
        </script>
        <script type="text/html" id="music-tpl">
            <tr>
                <td>{song_id}</td>
                <td>{song_name}</td>
                <td>{artist_id}</td>
                <td>{artist_name}</td>
                <td>{album_id}</td>
                <td>{album_name}</td>
                <td><img src="{album_logo}" /></td>
            </tr>
        </script>